<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father {
            overflow: hidden;
            width: 300px;
            height: 300px;
            margin: 100px auto;
            background-color: pink;
            text-align: center;
        }
        
        .son {
            width: 200px;
            height: 200px;
            margin: 50px;
            background-color: purple;
            line-height: 200px;
            color: #fff;
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="son">son儿子</div>
    </div>
    <script>
        var son = document.querySelector('.son')
        var father = document.querySelector('.father');
        son.addEventListener('click',function(e){
            alert('son');
            //阻止冒泡 e.stopPropagation() 后续事件不执行
            //cancelBubble ie678
            e.stopPropagation();
        },false)
        father.addEventListener('click',function(e){
            alert('father');
        },false)
        document.addEventListener('click',function(e) {
            alert('document');
        },false)
    </script>
</body>
</html>